﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace inventory
{
    public partial class voucherFindTotal : application.voucherFind
    {
        public voucherFindTotal()
        {
            try
            {
                InitializeComponent();
                findGrid.SetColumnVisible(ColumnNames.subTotal.ToString(), false);
                findGrid.AutoArrange();
            }
            catch (Exception er)
            {
                this.ShowError(er);
            }
        }
        protected override void LoadData()
        {
            myApplicationDS.Clear();
            DataAccess.DataLibs.VoucherOptions option = new DataAccess.DataLibs.VoucherOptions();
            voucherCriteriaWH.GetOptions(option);
            DataAccess.DataLibs.LoadData(myApplicationDS.Voucher, option);
            this.ShowReccount(myApplicationDS.Voucher.Count);
        }
        public override string myVoucherType
        {
            get { return voucherCriteriaWH.queryVoucherType; }
            set
            {
                base.myVoucherType = value;
                voucherCriteriaWH.queryVoucherType = value;
            }
        }
        public string myQueryStatementType
        {
            get
            {
                return voucherCriteriaWH.queryStatementType;
            }
            set
            {
                voucherCriteriaWH.queryStatementType = value;
            }
        }        
    }
}
